import './index.scss'

export default {
  name: 'choose-goods',
  props: {
    isGetChooseData: { // 是否开始返回数据
      type: Boolean,
      default: false
    }
  },
  watch: {
    isGetChooseData() {
      if (!this.currentChooseGoods.length) {
        this.$message.error('请选择商品')
        return
      }
      this.$emit('chooseGoodsFun', {
        data: this.currentChooseGoods
      })
    }
  },
  data() {
    return {
      // list: [
      //   {开发list
      //     id: '2412347878',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/jiandao_1622823500961.png',
      //     url: 'qiandaoyouli',
      //     title: '签到有礼',
      //     microTitle: '签到有礼',
      //     path: '/pages/mallService/signInPolite/signInPolite'
      //   },
      //   {
      //     id: '2412575478',
      //     url: 'huiyuanfuwu',
      //     iconUrl: '0',
      //     title: '会员服务',
      //     microTitle: '会员服务',
      //     path: '/pages/mallService/memberServices/index/index'
      //   },
      //   {
      //     id: '241234458980',
      //     iconUrl: '0',
      //     url: 'shangchangtongzhi',
      //     title: '领券中心',
      //     microTitle: '领券中心',
      //     path: '/pages/mallService/coupon/getCouponCenter/getCouponCenter'
      //   },
      //   {
      //     id: '24123412450',
      //     url: 'pinpaidaolan',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/pinpai_1622823527641.png',
      //     title: '品牌导览',
      //     microTitle: '品牌导览',
      //     path: '/pages/mallService/brandNavigation/brandList/brandList'
      //   },
      //   {
      //     id: '24123489344534',
      //     url: 'tingchejiaofei',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/tingche_1622823634244.png',
      //     title: '停车缴费',
      //     microTitle: '停车缴费',
      //     path: '/pages/car/wisdomParking/wisdomParking'
      //   },
      //   {
      //     id: '241234893434',
      //     url: 'tuangouhuodong',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/shangcang_1622823527637.png',
      //     title: '商场活动',
      //     microTitle: '商场活动',
      //     path: '/pages/mallService/mallActivities/activityList/activityList'
      //   },
      //   {
      //     id: '241234893468',
      //     url: 'xianshangshangcheng',
      //     iconUrl: '0',
      //     title: '快速积分',
      //     microTitle: '快速积分',
      //     path: '/pages/mallService/integrate/fastIntegrate/fastIntegrate'
      //   },
      //   {
      //     id: '241234893498',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/exchangePoints_1622823500936.png',
      //     url: 'jifenduihuan',
      //     title: '积分兑换',
      //     path: '/pages/mallService/integrate/integratesMall/integratesMall'
      //   },
      //   {
      //     id: '241234893998',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/xianshang2_1622823634340.png',
      //     url: 'jifenduihuan',
      //     title: '线上商城',
      //     path: ''
      //   },
      //   {
      //     id: '2412348934688',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/xizhu_1622823664623.png',
      //     url: '/static/index/selfHelpIntegral.png',
      //     title: '自助积分',
      //     path: '/pages/mallService/integrate/fastIntegrate/fastIntegrate'
      //   },
      //   {
      //     id: '24123489346823',
      //     iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/youxi_1622823664646.png',
      //     url: '/static/index/interactiveGameIcon.png',
      //     title: '互动游戏',
      //     path: ''
      //   }
      // ],
      list: [
        {
          id: '2412347878',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/jiandao_1622823500961_1623376662035.png',
          url: '/static/index/signIn.png',
          title: '签到有礼',
          microTitle: '签到有礼',
          path: '/pages/mallService/signInPolite/signInPolite'
        },
        {
          id: '2412575478',
          url: '/static/index/pointsConversion.png',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/exchangePoints_1622823500936_1623376635877.png',
          title: '积分兑换',
          microTitle: '积分兑换',
          path: '/pages/mallService/integrate/integratesMall/integratesMall'
        },
        {
          id: '241234458980',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/shangcang_1622823527637_1623376611390.png',
          url: '/static/index/mallActivityIcon.png',
          title: '商场活动',
          microTitle: '商场活动',
          path: '/pages/mallService/mallActivities/activityList/activityList'
        },
        {
          id: '24123412450',
          url: '/static/index/BrandNavigation.png',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/pinpai_1622823527641_1623376698559.png',
          title: '品牌导览',
          microTitle: '品牌导览',
          path: '/pages/mallService/brandNavigation/brandList/brandList'
        },
        {
          id: '24123489344534',
          url: '/static/index/carParkingIcon.png',
          iconUrl: 'http://file-sit.ibeeking.com/2021/06/05/tingche_1622823634244.png',
          title: '停车缴费',
          microTitle: '停车缴费',
          path: '/pages/car/wisdomParking/wisdomParking'
        },
        {
          id: '241234893434',
          url: '/static/index/onLineShop.png',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/xianshang2_1622823634340_1623376578346.png',
          title: '线上商城',
          microTitle: '线上商城',
          path: ''
        },
        {
          id: '241234893468',
          url: '/static/index/selfHelpIntegral.png',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/xizhu_1622823664623_1623376578377.png',
          title: '自助积分',
          microTitle: '自助积分',
          path: '/pages/mallService/integrate/fastIntegrate/fastIntegrate'
        },
        {
          id: '24123489346823',
          iconUrl: 'https://file.ibeeking.com/2021/06/11/youxi_1622823664646_1623376578356.png',
          url: '/static/index/interactiveGameIcon.png',
          title: '互动游戏',
          path: ''
        }
      ],
      option: {
        isPagination: true,
        isMenu: false,
        paginationTotal: 8,
        paginationCurrent: 1,
        paginationSize: 10,
        isSelection: true,
        column: [
          {
            label: '链接标题',
            prop: 'title',
            slotName: 'title'
          },
          {
            label: '当前图标',
            prop: 'iconUrl',
            slotName: 'iconUrl'
          },
          {
            label: '字体图标',
            prop: 'url',
            slotName: 'url'
          },
          {
            label: '链接路由',
            prop: 'path',
            slotName: 'path'
          }
        ]
      },
      currentChooseGoods: []// 当前选择的
    }
  },
  mounted() {
  },
  methods: {
    selectionChange(ev) {
      this.currentChooseGoods = ev
    }
  }
}
